import React, { Component } from 'react'
import Son from "./son"
import Context from "../util/context"
let {Provider} = Context
class Father extends Component {
   state = {
       name:""
   }
   checkVal=(data)=>{
        this.setState({
           name:data 
        })
   }
  render() {
    return (
      <div>
        <Provider value={"我是yy得数据"}>
            <Son send={this.checkVal}></Son>
          姓名：{this.state.name}
        </Provider>
       
      </div>
    )
  }
}

export default Father